import { Module } from "@nestjs/common";
import { ConfigModule } from "./ConfigModule/config.module";
import { DatabaseModule } from "./ShareModule/database/database.module";
import { LoggerModule } from "./coreModule/logger/log.module";
import { UserModule } from "./FeatureModule/user/user.module";
import { AuthModule } from "./FeatureModule/Auth/auth.module";
// import { APP_GUARD } from "@nestjs/core";
// import { Connection } from 'typeorm';
// import { JwtAuthGuard } from "./ConfigModule/guard/jwt.guard";

@Module({
    imports:[ConfigModule,DatabaseModule,LoggerModule,AuthModule,UserModule],
    // providers:[{
    //     provide:APP_GUARD,
    //     useFactory: async(connection:Connection) =>{
    //         const tokenRepository:any = connection.getRepository('token');
    //         return new JwtAuthGuard(tokenRepository);
    //     },
    //     inject:['typeormToken']
    // }]
})
export class AppModule{}